home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3376 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: news.NetVision.net.il!news
  2. From: iti@Jerusalem.netvision.net.il
  3. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.apps.compatibility.win95,comp.lang.c++
  4. Subject: HELP - CString conversion?
  5. Date: Tue, 23 Jan 96 16:26:35 PDT
  6. Organization: NetVision LTD.
  7. Message-ID: <NEWTNews.16531.822443361.Postmaster@Jerusalem.netvision.net.il>
  8. NNTP-Posting-Host: ts2cp10.netvision.net.il
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11. X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
  12.  
  13.  
  14.  
  15. When I try to read the text from a Edit Control (IDC_EDIT1) with the
  16. following code:
  17.  
  18. --------------------------------------------------------------
  19. CString callBuf;
  20. int msgLen = GetDlgItemText(IDC_EDIT1, callBuf, sizeof(callBuf));
  21. --------------------------------------------------------------
  22.  
  23. I get the following error:
  24.  
  25. --------------------------------------------------------------
  26. error C2664: 'GetDlgItemText' : cannot convert parameter 2 from 'class 
  27. ::CString ' to 'char __far *'
  28. --------------------------------------------------------------
  29.  
  30.  
  31. I am using Visual C++, how can I read the text directly into the CString?
  32. I know that I am doing something REAL STUPID so if you can be of any help-
  33.  
  34. Please send any advice you have for me to my EMail address:
  35.     iti@netvision.net.il
  36.  
  37. Thanks
  38. Yaakov
  39.  
  40.